import { getBannerAPI } from '@/apis/home'
export const useBanner = (distributionSite) => {
  const bannerList = ref([]) // 轮播图数据

  // 获取轮播图数据
  const getBanner = async () => {
    const res = await getBannerAPI({
      distributionSite
    })
    bannerList.value = res.result
  }

  onMounted(() => getBanner())

  return {
    bannerList,
  }
}
